home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
3.1
/
toasterall
/
arexx_examples
/
lwm
/
points2polys.lwm
< prev
next >
Wrap
Text File
|
1993-06-08
|
1KB
|
54 lines
/* CMD: Points->Polys
* Convert All points to single point polygons. Cut whole object.
* By Arnie Cachelin © 1992 NewTek Inc. */
call addlib "LWModelerARexx.port", 0
sysnam = 'Points To Polygons'
signal on error
signal on syntax
/* call removepols() */ /* This command doesn't create 1-point polygons... */
csurf=CurSurface()
call req_begin sysnam
id_txt = req_addcontrol("Convert Object", 'T',"To 1-Point Polygons")
id_srf = req_addcontrol("Surfaces",'R')
if (~req_post()) then do
call req_end
exit
end
surf = req_getval(id_srf)
call req_end()
say surf Csurf
if surf~=CSurf then call surface(surf)
n = xfrm_begin()
say n
call meter_begin 2*n, 'Transforming 'n' Points'
do i = 1 to n
Point.i= xfrm_getpos(i)
say Point.i
call meter_step
end
call xfrm_end()
call CUT()
call add_begin()
do i=1 to n
call add_point Point.i
call add_polygon i
end
call add_end()
call remlib "LWModelerARexx.port"
exit
syntax:
error:
call end_all
t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
exit
PointCount: PROCEDURE
n=XFRM_BEGIN()
call END_ALL()
return n